<?php
class raport extends MY_Controller{
    function raport(){
        parent::MY_Controller();
        $this->data['title'] = "Input Data Raport";
        $this->load->model('m_raport');
    }
    function index(){
        $this->data['content'] = "raport/v_raport";
        $this->data['subLink'] = "raport/raport_proses";
        $this->data['formTitle'] = "Form Raport";
        
        $this->render($this->data);
    }
    function raport_proses(){
        $insert = $this->m_raport->addRaport($_POST);
        if($insert['status'] == TRUE){
            $this->session->set_flashdata("message",1);
        }
        
        redirect("raport/raport_info/$insert[id]");
    }
    function raport_info($id){
        $this->data['content'] = "raport/raportInfo";
        $this->data['raportList'] = $this->m_raport->detailRaport($id);
        
        $this->render($this->data);
    }
}
?>
